// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from "vue";
import App from "./App";
import router from "./router";
// 三级联动需要全局注册组件
import TypeNav from "./components/TypeNav";
// 发送请求--拿数据
import { reqCategoryList } from "./api";

reqCategoryList();

// 引入vuex仓库插件
import store from "./store";

Vue.component(TypeNav.name, TypeNav);
Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
  el: "#app",
  router,
  store, //注册仓库，给每一个组件的身上添加$store属性

  components: {
    App
  },
  template: "<App/>"
});
